<!DOCTYPE html>
<html lang="ch">
<head>
    <meta charset="UTF-8">
    <title>登录界面</title>
    <style>
        div {
            margin: 230px auto;
            width: 230px;
            height: 165px;
            border: 1px black solid;
        }
    </style>
</head>
<body>
<div>
    <form method="post" action="/login/login.php" style="margin:20px;">
        <label>
            账号：
            <?php
            session_start();
            if (isset($_SESSION['username'])) {
                $enteredUsername = htmlspecialchars($_SESSION['username']);
                echo <<<EOT
            <input name="Username" required autofocus value="$enteredUsername">
EOT;
            } else {
                echo <<<EOT
            <input name="Username" required autofocus value="">
EOT;
            }
            ?>
        </label>
        <label>
            密码：<input name="Password" type="password" required>
        </label>
        <label>
            <input type="checkbox" name="remember" value="yes" checked>24小时内记住登录状态
        </label>
        <input name="login" type="submit" value="登录">
        <a href="/register/registerPage.php">注册</a>
    </form>
</div>
</body>
</html>